﻿Imports System.IO

Public Class Form1

    Public ds As DataSet

    Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
        Dim lector As StreamReader = New StreamReader("temp.txt")
        Dim linea As String = ""



        While lector.Peek() <> -1

            linea = lector.ReadLine()
            MessageBox.Show(linea)

            If String.IsNullOrEmpty(linea) Then
                Continue While

            End If

            Me.ListView1.Items.Add(linea)

        End While

    End Sub

    Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
        OpenFileDialog1.ShowDialog()


    End Sub

    Private Sub Button2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button2.Click
        If CheckBox1.CheckState = CheckState.Checked Then
            GenerarPreguntas.CargarXLS(Me.Label1.Text, ds, True, NumericUpDown1.Value)
        Else
            GenerarPreguntas.CargarXLS(Me.Label1.Text, ds, False, NumericUpDown1.Value)
        End If

    End Sub
End Class
